/* Class65 - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */
import java.awt.Component;

public class Class65 {
	public static int[] anIntArray1132;
	public static JString aClass3_1133;
	public static JString aClass3_1134;
	public static int anInt1135;
	public static RSInterface aClass39_Sub5_Sub17_1136;
	public static int anInt1137 = 0;
	public static int anInt1138 = 0;
	public static JString aClass3_1139;
	public static JString aClass3_1140;
	public static int anInt1141;
	public static JString aClass3_1142;
	public static int anInt1143;
	public static int anInt1144;
	public static int absoluteRegionX;
	public static Class39_Sub5_Sub10_Sub4 aClass39_Sub5_Sub10_Sub4_1146;
	public static int anInt1147;

	public static void method1092(int i, int i_0_, byte i_1_) {
		Deque class49 = Class20.groundItems[Class11.currentPlane][i][i_0_];
		if (class49 == null)
			Class44.aClass38_836.method373(Class11.currentPlane, i, i_0_);
		else {
			int i_2_ = -99999999;
			Class39_Sub5_Sub4_Sub3 class39_sub5_sub4_sub3 = null;
			for (Class39_Sub5_Sub4_Sub3 class39_sub5_sub4_sub3_3_ = (Class39_Sub5_Sub4_Sub3) class49.method969(false); class39_sub5_sub4_sub3_3_ != null; class39_sub5_sub4_sub3_3_ = ((Class39_Sub5_Sub4_Sub3) class49.method963((byte) -87))) {
				Class39_Sub5_Sub1 class39_sub5_sub1 = Class26.method291(-69, class39_sub5_sub4_sub3_3_.anInt2248);
				int i_4_ = class39_sub5_sub1.anInt1686;
				if (class39_sub5_sub1.anInt1662 == 1)
					i_4_ *= class39_sub5_sub4_sub3_3_.anInt2243 + 1;
				if (i_4_ > i_2_) {
					class39_sub5_sub4_sub3 = class39_sub5_sub4_sub3_3_;
					i_2_ = i_4_;
				}
			}
			if (class39_sub5_sub4_sub3 == null)
				Class44.aClass38_836.method373(Class11.currentPlane, i, i_0_);
			else {
				class49.method966(class39_sub5_sub4_sub3, -95);
				Class39_Sub5_Sub4_Sub3 class39_sub5_sub4_sub3_5_ = null;
				int i_6_ = i - (-(i_0_ << 7) - 1610612736);
				Class39_Sub5_Sub4_Sub3 class39_sub5_sub4_sub3_7_ = (Class39_Sub5_Sub4_Sub3) class49.method969(false);
				Class39_Sub5_Sub4_Sub3 class39_sub5_sub4_sub3_8_ = null;
				for (/**/; class39_sub5_sub4_sub3_7_ != null; class39_sub5_sub4_sub3_7_ = ((Class39_Sub5_Sub4_Sub3) class49.method963((byte) -87))) {
					if (class39_sub5_sub4_sub3_7_.anInt2248 != class39_sub5_sub4_sub3.anInt2248) {
						if (class39_sub5_sub4_sub3_5_ == null)
							class39_sub5_sub4_sub3_5_ = class39_sub5_sub4_sub3_7_;
						if ((class39_sub5_sub4_sub3_7_.anInt2248 != class39_sub5_sub4_sub3_5_.anInt2248) && class39_sub5_sub4_sub3_8_ == null)
							class39_sub5_sub4_sub3_8_ = class39_sub5_sub4_sub3_7_;
					}
				}
				Class44.aClass38_836.method391(Class11.currentPlane, i, i_0_, Class14.method212(i_0_ * 128 + 64, 9990, Class11.currentPlane, i * 128 + 64), class39_sub5_sub4_sub3, i_6_, class39_sub5_sub4_sub3_5_, class39_sub5_sub4_sub3_8_);
			}
		}
	}

	public static void method1093(int i) {
		anIntArray1132 = null;
		aClass3_1134 = null;
		aClass3_1140 = null;
		aClass3_1139 = null;
		aClass3_1142 = null;
		aClass39_Sub5_Sub17_1136 = null;
		aClass39_Sub5_Sub10_Sub4_1146 = null;
		aClass3_1133 = null;
	}

	public static int[] method1094(int i, RSInterface class39_sub5_sub17) {
		int i_9_ = class39_sub5_sub17.anInt2084 >> 16;
		if (!RSSocket.method219(0, i_9_))
			return null;
		int i_10_ = class39_sub5_sub17.mainX;
		int i_11_ = class39_sub5_sub17.mainY;
		RSInterface class39_sub5_sub17_12_;
		for (int i_13_ = class39_sub5_sub17.anInt2050; i_13_ != -1; i_13_ = class39_sub5_sub17_12_.anInt2050) {
			class39_sub5_sub17_12_ = (Class62_Sub1.interfaceCache[i_9_][i_13_ & 0xffff]);
			i_11_ += (class39_sub5_sub17_12_.mainY - class39_sub5_sub17_12_.anInt1994);
			i_10_ += (-class39_sub5_sub17_12_.anInt2064 + class39_sub5_sub17_12_.mainX);
		}
		int[] is = new int[2];
		is[1] = i_11_;
		is[0] = i_10_;
		return is;
	}

	public static void method1095(int i) {
		synchronized (Class4.anObject61) {
			if (Class23.anInt433 == 0)
				Class39_Sub5_Sub9.aClass21_1802.method252(-82, new OnDemandFetcher(), 5);
			Class23.anInt433 = 600;
		}
	}

	public static Class39_Sub1_Sub1 method1096(boolean bool, Signlink class21, Component component, int i, int i_14_) {
		Class15.method214(i_14_, component, bool, class21, 0);
		Class39_Sub1_Sub1 class39_sub1_sub1 = new Class39_Sub1_Sub1();
		Class13.method191((byte) 121, class39_sub1_sub1);
		return class39_sub1_sub1;
	}

	public static void method1097(int i, long l) {
		if (l != 0L) {
			if (Class15.anInt282 >= 100)
				Class42.pushMessage(Class66.aClass3_1164, Class23.aClass3_431, false, 0);
			else {
				JString class3 = Deque.longToString(l, (byte) 88).capitalizeAfterQuestion((byte) -84);
				for (int i_15_ = 0; Class15.anInt282 > i_15_; i_15_++) {
					if (l == Class39_Sub5_Sub9.aLongArray1808[i_15_]) {
						Class42.pushMessage(Class66.aClass3_1164, (Class39_Sub5_Sub11.method708((new JString[] { class3, Class39_Sub5.aClass3_1343 }), i + 14569)), false, 0);
						return;
					}
				}
				for (int i_16_ = i; i_16_ < Class4.anInt62; i_16_++) {
					if (l == Applet_Sub1.aLongArray2[i_16_]) {
						Class42.pushMessage(Class66.aClass3_1164, (Class39_Sub5_Sub11.method708((new JString[] { Class39_Sub11.aClass3_1467, class3, (RuntimeException_Sub1.aClass3_1214) }), 14569)), false, 0);
						return;
					}
				}
				if (!class3.equals((Class7.aClass39_Sub5_Sub4_Sub4_Sub2_109.aClass3_2521))) {
					Class39_Sub5_Sub9.aLongArray1808[Class15.anInt282++] = l;
					Class39_Sub14.aBoolean1520 = true;
					PacketStream.outputStream.writePacket(198);
					PacketStream.outputStream.writeLong(true, l);
				}
			}
		}
	}

	public static Class39_Sub5_Sub5 method1098(byte i, int i_17_) {
		Class39_Sub5_Sub5 class39_sub5_sub5 = ((Class39_Sub5_Sub5) PacketStream.aClass7_2158.method133((byte) -45, (long) i_17_));
		if (class39_sub5_sub5 != null)
			return class39_sub5_sub5;
		byte[] is = PacketParser.aClass9_1072.method165(30605, 5, i_17_);
		class39_sub5_sub5 = new Class39_Sub5_Sub5();
		if (is != null)
			class39_sub5_sub5.method572(new Stream(is), (byte) 24);
		PacketStream.aClass7_2158.method135(class39_sub5_sub5, (long) i_17_, (byte) 122);
		return class39_sub5_sub5;
	}

	public static void method1099(byte i, Class9 class9) {
		Class39_Sub5_Sub1.aClass9_1680 = class9;
	}

	static {
		aClass3_1134 = Class39_Sub5_Sub9.createJString(109, "Please use a different world)3");
		aClass3_1133 = Class39_Sub5_Sub9.createJString(127, "Spiel)2Fenster geladen)3");
		aClass3_1140 = aClass3_1134;
		aClass3_1139 = Class39_Sub5_Sub9.createJString(111, "Ausw-=hlen");
		anInt1144 = 0;
		aClass3_1142 = aClass3_1134;
		anInt1141 = 0;
	}
}
